import logging

LOG_FORMAT = "%(asctime)s - %(filename)s[line:%(lineno)d] - %(levelname)s: %(name)s: %(message)s"

logging.basicConfig(format=LOG_FORMAT, level=logging.DEBUG)

logger = logging.getLogger(__name__)

if __name__ == '__main__':

    logger.debug('%s(%d) pi=%f', 'A debug log', 333, 3.1415926)
